﻿<%@ Page Title="" Language="C#" Theme="Alpha" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Registration.aspx.cs" Inherits="App.Registration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:Panel ID="Panel2" runat="server" Visible="False">
        <asp:Label ID="lblInfo" runat="server" Text="Registrace proběhla úspěšně" CssClass="formMessage"></asp:Label>
    </asp:Panel>
    <asp:Panel ID="Panel1" runat="server">

        <asp:Panel ID="Panel3" runat="server">

            <div id="regInner">
                <div class="formField">
                    <asp:Label ID="Label1" runat="server" Text="Přezdívka:"></asp:Label>
                    <asp:TextBox ID="txtboxNick" runat="server" 
                        ValidationGroup="RegistrationValidation" MaxLength="50"></asp:TextBox>&nbsp;*
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtboxNick" ErrorMessage="Nezadaná přezdívka" ValidationGroup="RegistrationValidation"></asp:RequiredFieldValidator>
                </div>
                <div class="formField">
                    <asp:Label ID="Label2" runat="server" Text="Heslo:"></asp:Label>
                    <asp:TextBox ID="txtboxPassword" runat="server" TextMode="Password" 
                        ValidationGroup="RegistrationValidation" MaxLength="50"></asp:TextBox>&nbsp;*
                </div>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtboxPassword" ErrorMessage="Heslo musíte vyplnit" ValidationGroup="RegistrationValidation"></asp:RequiredFieldValidator>
                <div class="formField">
                    <asp:Label ID="Label3" runat="server" Text="Potvrzení hesla:"></asp:Label>
                    <asp:TextBox ID="txtboxPassword2" runat="server" TextMode="Password"  
                        ValidationGroup="RegistrationValidation" MaxLength="50"></asp:TextBox>&nbsp;*
                </div>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtboxPassword2" ErrorMessage="Heslo musíte vyplnit" ValidationGroup="RegistrationValidation"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtboxPassword" ControlToValidate="txtboxPassword2" ErrorMessage="Hesla musí být totožná" ValidationGroup="RegistrationValidation"></asp:CompareValidator>
                <div class="formField">
                    <asp:Label ID="lblname" runat="server" Text="Jméno:"></asp:Label>
                    <asp:TextBox ID="txtname" runat="server" MaxLength="50"></asp:TextBox>
                </div>
                <div class="formField">
                    <asp:Label ID="lblsurname" runat="server" Text="Příjmení:"></asp:Label>
                    <asp:TextBox ID="txtsurname" runat="server" MaxLength="50"></asp:TextBox>
                </div>
                <div class="formField">
                    <asp:Label ID="lbladdress" runat="server" Text="Adresa:"></asp:Label>
                    <asp:TextBox ID="txtAddress" runat="server" MaxLength="50"></asp:TextBox>
                </div>
                <div class="formField">
                    <asp:Label ID="lblphone" runat="server" Text="Telefon: +420"></asp:Label>
                    <asp:TextBox ID="txtPhone" runat="server" 
                        ValidationGroup="RegistrationValidation" MaxLength="9"></asp:TextBox>                        
                </div>
                <div class="formField">
                    <asp:Label ID="lblemailPrim" runat="server" Text="Email:"></asp:Label>
                    <asp:TextBox ID="txtEmailP" runat="server" 
                        ValidationGroup="RegistrationValidation" CausesValidation="true" MaxLength="50"></asp:TextBox>&nbsp;*
                </div>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEmailP" ErrorMessage="Email musíte vyplnit" ValidationGroup="RegistrationValidation"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  ErrorMessage="Email má špatný tvar" ControlToValidate="txtEmailP" ValidationGroup="RegistrationValidation" ValidationExpression="[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}"></asp:RegularExpressionValidator >
                <div class="formField">
                    <asp:Label ID="lblemailSec" runat="server" Text="Záložní email:"></asp:Label>
                    <asp:TextBox ID="txtEmailS" runat="server" MaxLength="50"></asp:TextBox>
                </div>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                    ControlToValidate="txtICQ" ErrorMessage="Chybné ICQ číslo" 
                    ValidationExpression="[0-9]{9}" ValidationGroup="RegistrationValidation"></asp:RegularExpressionValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                    ControlToValidate="txtPhone" ErrorMessage="Chybné telefonní číslo" 
                    ValidationExpression="[0-9]{9}"></asp:RegularExpressionValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Email má špatný tvar" ControlToValidate="txtEmailS" ValidationGroup="RegistrationValidation" ValidationExpression="[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}"></asp:RegularExpressionValidator>
                <div class="formField">
                    <asp:Label ID="lblICQ" runat="server" Text="ICQ číslo:"></asp:Label>
                    <asp:TextBox ID="txtICQ" runat="server" 
                        ValidationGroup="RegistrationValidation" MaxLength="50"></asp:TextBox>
                </div>
               
                <div class="formField">
                    <asp:Label ID="Label4" runat="server" Text="URL avataru:"></asp:Label>
                    <asp:TextBox ID="TextBoxURL" runat="server" 
                        ValidationGroup="RegistrationValidation" MaxLength="200"></asp:TextBox>
                </div>
                <div class="formButton">
                    <asp:Button ID="Button1" runat="server" Text="Registrovat" onclick="Button1_Click" ValidationGroup="RegistrationValidation" />     
                </div>
            </div>
                     
        </asp:Panel>

    </asp:Panel>
</asp:Content>